import java.awt.event.TextEvent;
import java.awt.event.TextListener;
import java.io.IOException;

public class JGI_Textlistener implements TextListener
{
	JAPI_SocketOutputStream JGI_actionstream;
	int JGI_id;		
	int debuglevel=0;	
	
	public JGI_Textlistener(int object_id,JAPI_SocketOutputStream action)
	{
		JGI_actionstream=action;
		JGI_id = object_id;	
	}


	public void textValueChanged(TextEvent e)
	{
		if(debuglevel > 1) System.out.println("Text Event in Object : "+this.JGI_id);	
		try
		{	
			JGI_actionstream.sendInt(JGI_id);
		}	
		catch(IOException exce) {}		
	}

	public void setdebuglevel(int level)
	{
		debuglevel=level;
	}
}